package com.example.demo.language;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * ******************************************************
 *
 * @author liugh9
 * @version 1.0
 * @classname LanguageBase
 * @description
 * @date 2023/02/16 17:16
 * <p>
 * ******************************************************
 */
@Component
public abstract class LanguageConfig {

    protected Map<Integer, ILanguageService> languageMap = new HashMap<>();

    @Resource
    private ILanguageService zhService;

    @Resource
    private ILanguageService enService;

    @PostConstruct
    private void init() {
        languageMap.put(LanguageTypeEnum.CHINESE.getId(), zhService);
        languageMap.put(LanguageTypeEnum.ENGLISH.getId(), enService);
    }

}
